package com.lengxf.design;

public class Client {
    public static void main(String[] args) {
        //可增加逻辑进行工厂的选择
        LoggerFactory loggerFactory = new DatabaseLoggerFactory();
        Logger logger = loggerFactory.createLogger();
        logger.writeLog();

        LoggerFactory fileLoggerFactory = new FileLoggerFactory();
        fileLoggerFactory.writeLog();
    }
}
